<%-- 
    Document   : addVehicleBooking
    Created on : May 19, 2009, 12:49:23 AM
    Author     : Dany Gunawan
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<c:set var="title" value="Add Vehicle Booking" scope="page"/>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>${title}</title>
    </head>
    <body>

        <h1${title}></h1>

        <f:view>

             <!-- Show error messages -->
            <h:messages showSummary="true" showDetail="false" style="color: red; font-family: 'New Century Schoolbook', serif; font-style: oblique" id="errors" />
            
             <p>Contact Name <h:inputText value="#{VehicleBookingJSFManagedBean.vehicleBooking.contactName}" required="true" id="contactName"/></p>
             <p>Contact Phone <h:inputText value="#{VehicleBookingJSFManagedBean.vehicleBooking.contactPhone}" required="true" id="contactPhone"/></p>
             <p>Contact Email <h:inputText value="#{VehicleBookingJSFManagedBean.vehicleBooking.contactEmail}" required="true" id="contactEmail"/></p>
             <p>Customer Name <h:inputText value="#{VehicleBookingJSFManagedBean.vehicleBooking.customerName}" required="true" id="customerName"/></p>

             <p>Pick Up Date </p>
             <p>Pick Up Address<h:inputText value="#{VehicleBookingJSFManagedBean.vehicleBooking.pickUpAddress}" required="true" id="pickUpAddress"/></p>
             <p>Drop Off Address<h:inputText value="#{VehicleBookingJSFManagedBean.vehicleBooking.dropOffAddress}" required="true" id="dropOffAddress"/></p>

             <p>Booking type
                <h:selectOneMenu value="#{VehicleBookingJSFManagedBean.vehicleBooking.bookingTypeId}" required="true" id="bookingTypeId">
                    <f:selectItems value="#{VehicleBookingJSFManagedBean.bookingTypes}"  />
                </h:selectOneMenu>
            </p>

            <p>Event type
                <h:selectOneMenu value="#{VehicleBookingJSFManagedBean.vehicleBooking.eventTypeId}" required="true" id="eventTypeId">
                    <f:selectItems value="#{VehicleBookingJSFManagedBean.eventTypes}"  />
                </h:selectOneMenu>
            </p>

            <p>Vehicle type
                <h:selectOneMenu value="#{VehicleBookingJSFManagedBean.vehicleBooking.vehicleTypeId}" required="true" id="vehicleTypeId">
                    <f:selectItems value="#{VehicleBookingJSFManagedBean.vehicleTypes}"  />
                </h:selectOneMenu>
            </p>

            <p>Special Requirement<h:inputText value="#{VehicleBookingJSFManagedBean.vehicleBooking.specialRequirement}" required="true" id="specialRequirement"/></p>
            <p>Comment<h:inputText value="#{VehicleBookingJSFManagedBean.vehicleBooking.comment}" required="true" id="comment"/></p>

             <p>Vehicle
                <h:selectOneMenu value="#{VehicleBookingJSFManagedBean.vehicleBooking.vehicleId}" required="true" id="vehicleId">
                    <f:selectItems value="#{VehicleBookingJSFManagedBean.vehicles}"  />
                </h:selectOneMenu>
            </p>

             <p>Corporate Client
                <h:selectOneMenu value="#{VehicleBookingJSFManagedBean.vehicleBooking.corporateClientId}" required="true" id="corporateClientId">
                    <f:selectItems value="#{VehicleBookingJSFManagedBean.corporateClients}"  />
                </h:selectOneMenu>
            </p>
            
            <h:commandButton id="submit" value="Submit" action="#{VehicleBookingJSFManagedBean.addVehicleBooking}"/>
         
        </f:view>
        
    </body>
</html>
